-- GENERATED SPELL FOR [High Protector Lorik] --


function spell0_1846(pUnit, Event) --@Arcane Blast,n/a--
pUnit:FullCastSpellOnTarget(10833,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1846', 593, 1)
end

function spell1_1846(pUnit, Event) --@Divine Shield,Self--
pUnit:FullCastSpellOnTarget(13874,pUnit)
pUnit:RegisterEvent('Sorts_1846', 8309, 1)
end

function spell2_1846(pUnit, Event) --@Holy Light,Heal--
pUnit:FullCastSpellOnTarget(15493,pUnit)
pUnit:RegisterEvent('Sorts_1846', 2500, 1)
end

function spell3_1846(pUnit, Event) --@Retribution Aura,Self--
pUnit:FullCastSpellOnTarget(8990,pUnit)
pUnit:RegisterEvent('Sorts_1846', 549, 1)
end

function spell4_1846(pUnit, Event) --@Shield Slam,n/a--
pUnit:FullCastSpellOnTarget(15655,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1846', 2347, 1)
end

function Sorts_1846(pUnit, Event)
local choix_sorts_1846 = math.random(0, 4)
if choix_sorts_1846 == 0 then
pUnit:RegisterEvent('spell0_1846', 1, 1)
end
if choix_sorts_1846 == 1 then
pUnit:RegisterEvent('spell1_1846', 1, 1)
end
if choix_sorts_1846 == 2 then
pUnit:RegisterEvent('spell2_1846', 1, 1)
end
if choix_sorts_1846 == 3 then
pUnit:RegisterEvent('spell3_1846', 1, 1)
end
if choix_sorts_1846 == 4 then
pUnit:RegisterEvent('spell4_1846', 1, 1)
end
end

function mob1846_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1846', math.random(1500, 3000), 1)
end

function mob1846_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1846_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1846_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1846, 1, 'mob1846_Action')
RegisterUnitEvent(1846, 2, 'mob1846_Leave')
RegisterUnitEvent(1846, 3, 'mob1846_Kill')
RegisterUnitEvent(1846, 4, 'mob1846_Die')
